<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
</body>
</html>
<script>
// 为 数组，增加一个 add10 的实例方法
  // 即 arr.add10(),  它的返回值为 arr 中每个数字增加 10
const arr = [1, 2, 23, 4, 5, 6, 7];

Array.prototype.add10 = function() {
  // console.log(this);
  return this.map(d => d + 10);
}

arr.add10();
console.log(arr.add10());
</script>